package com.example.ccj.b.c.custom.adapter;


import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.example.ccj.b.c.ui.install.SwitchCheckBoxControl;

import java.util.List;

/**
 * 放置图表设置标签Recycler的Adapter
 * 2023年1月7日17:41:48
 */
public class InstallRecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
    private final List<SwitchCheckBoxControl> switchCheckBoxControls;

    public InstallRecyclerAdapter(List<SwitchCheckBoxControl> switchCheckBoxControls){
        this.switchCheckBoxControls = switchCheckBoxControls;
    }

    @NonNull
    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new ViewHolder(switchCheckBoxControls.get(viewType));
    }

    @Override
    public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return switchCheckBoxControls.size();
    }


    @Override
    public int getItemViewType(int position) {
        return position;
    }

    //
    static class ViewHolder extends RecyclerView.ViewHolder{
        public ViewHolder(@NonNull View itemView) {
            super(itemView);
        }
    }



}
